package com.jy.wms.controller;

import PTLwebService.Result;
import PTLwebService.SendCheckInventoryData;
import PTLwebService.SendCheckInventoryDataResponse;
import com.jy.wms.service.WmsInventoryPlanService;
import com.jy.wms.webservice.*;
import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;

import javax.annotation.Resource;
@Endpoint
public class AddSendCheckInventoryData {
    private static final String NAMESPACE_URI = "http://tempuri.org/";
    @Resource
    WmsInventoryPlanService wmsInventoryPlanService;
    @PayloadRoot(namespace = NAMESPACE_URI, localPart = "SendCheckInventoryData")
    @ResponsePayload
    public SendCheckInventoryDataResponse getCountry(@RequestPayload SendCheckInventoryData sendCheckInventoryData){

       SendCheckInventoryDataResponse response=new SendCheckInventoryDataResponse();
        Result result=new Result();
       if(sendCheckInventoryData.getCheckInventory()==null){
           result.setResult("E");
           result.setSMsg("推送盘点计划失败");
       }else{
           result.setResult("S");
           result.setSMsg("推送盘点计划成功");
       }
        response.setSendCheckInventoryDataResult(result);
        return response;
    }
}
